package cn.taneroom.lucene.analyzer;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

/**
 * 简单的近义词提取引擎实现
 * @author TaneRoom
 * @since 2016年9月5日 上午10:54:59
 */
public class SimpleSynonymEngine implements SynonymEngine {

	private static Map<String,String[]> map = new HashMap<String,String[]>();
	
	static {
		map.put("我", new String[]{"俺","咱","w","wo","I","i"});
		map.put("中国", new String[]{"天朝","华夏","中华","china","zhong"});
		map.put("北京", new String[]{"帝都","紫荆城","天安门","奥运会","beijing"});
	}
	
	@Override
	public String[] getSynonyms(String s) throws IOException {
		return map.get(s);
	}

}
